libversion_big   := .0.2.0
libversion_small := .0
libname  				 := libjsonplus.so
bindir   				 := libcompiled/
libdir					 := /usr/lib/
incdir           := /usr/include/
localincdir      := src/include/
libinc           := jsonplus/

all:
	(cd src/    && make)

install:
	cp $(bindir)$(libname) $(libdir)$(libname)$(libversion_big)
	ln -sf $(libdir)$(libname)$(libversion_big) $(libdir)$(libname)$(libversion_small)
	ln -sf $(libdir)$(libname)$(libversion_big) $(libdir)$(libname)
	ldconfig
	mkdir -p $(incdir)$(libinc)
	cp -r $(localincdir)* $(incdir)$(libinc)

uninstall:
	rm $(libdir)$(libname)*
	ldconfig

reinstall:
	make uninstall
	make install

clean:
	(cd src/    && make clean)

rebuild:
	make clean
	make all

